test: events sent during remote join handshake should not be lost#847
test: events sent during remote join handshake should not be lost#847FrenchGithubUser wants to merge 4 commits intomatrix-org:mainfrom
Conversation
3b8e96d to
e5b41dc
Compare
There was a problem hiding this comment.
Pull request overview
Adds a regression test to ensure events created during the federation join handshake (between /make_join and /send_join) remain discoverable to the joining server, preventing missed events / unreachable forward extremities during joins.
Changes:
- Added
TestEventBetweenMakeJoinAndSendJoinIsNotLostto assert intervening events become discoverable (directly or viaprev_eventsreferences). - Implemented a custom federation
/_matrix/federation/v1/send/{transactionID}handler to observe outbound PDUs before the Complement server is in the room. - Added
ioimport to read raw transaction bodies.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
95d0c03 to
0b5cea2
Compare
MadLittleMods
left a comment
There was a problem hiding this comment.
Thanks for the updates so far @FrenchGithubUser! This is looking close
0b5cea2 to
1194d18
Compare
|
Had a few hiccups with git, I hope I didn't mess something up, but looks fine |
| // extremities, prompting the joining server to backfill. | ||
| // | ||
| // See https://github.com/element-hq/synapse/pull/19390 | ||
| func TestEventBetweenMakeJoinAndSendJoinIsNotLost(t *testing.T) { |
There was a problem hiding this comment.
Thanks for the updates @FrenchGithubUser. The test looks good now. Just a case of deciding where it should go:
Discussion for whether this should live in the Complement repo or as a in-repo Complement test, element-hq/synapse#19390 (comment)
Co-authored-by: Eric Eastwood <madlittlemods@gmail.com>
Test for element-hq/synapse#19390
Disclaimer
As I'm not super fluent with go, I used a lot of AI to write this test. However, I did review it as best as I could together with someone else from Famedly.
Pull Request Checklist
Signed-off-by: Thomas Traineau t.traineau@famedly.com